package com.learn.jni;

import java.net.URL;

public class JniDemo {


    static {
        // hello.dll (Windows) or libhello.so (Unixes)
        URL url =JniDemo.class.getResource("/jni/libJniDemo.so");
        String path = url.getPath();
        System.load(path);
    }

    private native void sayHello();

    public static void main(String[] args) {

        new JniDemo().sayHello();  // invoke the native method
    }

}
